import {
	Request
} from "./request"

module.exports = {
	getBannerList: () => {
		return Request({
			url: "/banner/list",
			method: "get"
		})
	},
	getGoodsCate:()=>{
		return Request({
			url:"/shop/goods/category/all",
			method:"get"
		})
	},
	getGoodsList:(data={})=>{
		return Request({
			url:"/shop/goods/list/v2",
			method:"post",
			data
		})
	},
	getGoodsDetail:(data)=>{
		return Request({
			url:"/shop/goods/detail",
			method:"get",
			data
		})
	},
	login:(data)=>{
		return	Request({
			url:"/user/wxapp/authorize",
			method:"post",
			data
		})
	},
	addCate:(data)=>{
		return	Request({
			url:"/shopping-cart/add",
			method:"post",
			data
		})
	},
	getCate:(data)=>{
		return Request({
			url:"/shopping-cart/info",
			method:"get",
			data
		})
	},
	changeCateNum:(data)=>{
		return 	Request({
			url:"/shopping-cart/modifyNumber",
			method:"post",
			data
		})
	},
	clearCate:(data)=>{
		return Request({
			url:"/shopping-cart/empty",
			method:"post",
			data

		})
	},
	deleteCate:(data)=>{
		return Request({
			url:"/shopping-cart/remove",
			method:"post",
			data

		})
	},
	addfav:(data)=>{
		return Request({
			url:"/shop/goods/fav/add",
			method:"post",
			data
		})
	},
	getfav:(data)=>{
		return Request({
			url:"/shop/goods/fav/check",
			method:"get",
			data
		})
	},
	deletefav:(data)=>{
		return Request({
			url:"/shop/goods/fav/delete",
			method:"post",
			data
		})
	},
	favlist:(data)=>{
		return Request({
			url:"/shop/goods/fav/list/v2",
			method:"post",
			data
		})
	},

}